import vue from 'vue'
import alert from './alert.vue'
const Init = function () {
  const Alert = vue.extend(alert)
  return function alert(o) {
    let alert = new Alert();
    o.title && (alert.text = o.title)
    o.ok && (alert.a_confirm = o.ok)
    alert.$mount();
  }
}

export default {
  install: function (vue) {
    vue.prototype.$alert = Init()
  }
}